package databaseVersionControl.infra.script.validation;

import databaseVersionControl.domain.dialect.Dialect;
import databaseVersionControl.domain.factory.composite.CreateSequenceComposite;

public class CheckExistSequencePreInstallCondition extends PreInstallCondition<CreateSequenceComposite> {

	public CheckExistSequencePreInstallCondition(CreateSequenceComposite component) {
		super(component);
	}

	@Override
	public int getValueCondition() {
		return PreInstallCondition.SHOULD_NOT_EXIST;
	}

	@Override
	public String sqlInDialect(Dialect dialect) {
		return dialect.checkExistSequence(component.getName());
	}

}
